package com.pureut.storage.controller;

import com.pureut.common.core.web.controller.BaseController;
import com.pureut.common.core.web.page.TableDataInfo;
import com.pureut.storage.dto.SalesReturnDetailDto;
import com.pureut.storage.dto.SubcontractReceiptDetailDto;
import com.pureut.storage.service.SalesReturnDetailService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/***
 * 销售退货明细 控制层
 * Author:C
 * Date:2023/01/29 8:54
 * @DESC
 */
@RestController
@RequestMapping("/sales-return-detail")
public class SalesReturnDetailController extends BaseController {

    @Resource
    SalesReturnDetailService salesReturnDetailService;

    /**
     * 销售退货明细列表
     */
    @GetMapping("/list")
    public TableDataInfo getList(Long id) {
        startPage();
        //查询销售退货明细列表
        List<SalesReturnDetailDto> list = salesReturnDetailService.getSalesReturnDetail(id);
        return getDataTable(list);
    }
}
